package Test;

import java.util.Comparator;

/**
 * @Auther: lizhipeng
 * @Date: 2024-10-08 - 10 - 08 - 11:51
 * @Description: Test
 * @version: 1.0
 */
//给treeMap调用的比较器对象
public class StuentCompartor implements Comparator<Student> {

    @Override
    public int compare(Student o1, Student o2) {
        return (int)(o1.getAge() - o2.getAge());
    }
}
